<template>
  <div class="splash-container">
    <!-- 状态栏 -->
    <div class="status-bar">
      <span class="time">9:41</span>
      <div class="status-icons">
        <div class="signal-icon">
          <div class="signal-bar" v-for="i in 4" :key="i" :style="{ height: `${i * 3}px` }"></div>
        </div>
        <div class="wifi-icon">📶</div>
        <div class="battery-icon">
          <div class="battery-body">
            <div class="battery-level"></div>
          </div>
          <div class="battery-tip"></div>
        </div>
      </div>
    </div>

    <!-- 主要内容区域 -->
    <div class="main-content">
      <!-- 装饰性圆点 -->
      <div class="floating-dots">
        <div class="dot dot-1"></div>
        <div class="dot dot-2"></div>
        <div class="dot dot-3"></div>
        <div class="dot dot-4"></div>
        <div class="dot dot-5"></div>
        <div class="dot dot-6"></div>
        <div class="dot dot-7"></div>
        <div class="dot dot-8"></div>
        <div class="dot dot-9"></div>
        <div class="dot dot-10"></div>
        <div class="dot dot-11"></div>
        <div class="dot dot-12"></div>
        <div class="dot dot-13"></div>
        <div class="dot dot-14"></div>
        <div class="dot dot-15"></div>
      </div>

      <!-- 中心出租车图标 -->
      <div class="taxi-icon-container">
        <div class="taxi-background">
          <div class="taxi-icon">
            🚕
          </div>
        </div>
      </div>
    </div>

    <!-- 底部加载动画 -->
    <div class="loading-container">
      <div class="loading-dots">
        <div class="loading-dot" v-for="i in 8" :key="i" :style="{ animationDelay: `${i * 0.15}s` }"></div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()

onMounted(() => {
  // 3秒后自动跳转到登录页面
  setTimeout(() => {
    router.push('/login')
  }, 3000)
})
</script>

<style scoped>
.splash-container {
  height: 100vh;
  width: 100vw;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 状态栏 */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  height: 44px;
  box-sizing: border-box;
}

.time {
  font-weight: 600;
  color: #2c3e50;
  font-size: 16px;
}

.status-icons {
  display: flex;
  gap: 4px;
  font-size: 14px;
}

/* 主要内容区域 */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* 装饰性圆点 */
.floating-dots {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.dot {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  opacity: 0.7;
  animation: float 4s ease-in-out infinite;
}

.dot-1 { width: 60px; height: 60px; top: 15%; left: 10%; }
.dot-2 { width: 40px; height: 40px; top: 25%; right: 15%; }
.dot-3 { width: 20px; height: 20px; top: 35%; left: 20%; }
.dot-4 { width: 80px; height: 80px; top: 60%; right: 10%; }
.dot-5 { width: 30px; height: 30px; top: 70%; left: 15%; }
.dot-6 { width: 25px; height: 25px; top: 80%; right: 25%; }
.dot-7 { width: 15px; height: 15px; top: 45%; left: 5%; }
.dot-8 { width: 35px; height: 35px; top: 20%; left: 60%; }
.dot-9 { width: 50px; height: 50px; top: 75%; left: 45%; }
.dot-10 { width: 18px; height: 18px; top: 55%; right: 30%; }
.dot-11 { width: 28px; height: 28px; top: 30%; left: 75%; }
.dot-12 { width: 22px; height: 22px; top: 65%; left: 70%; }

@keyframes float {
  0%, 100% {
    transform: translateY(0px) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) scale(1.1);
    opacity: 0.9;
  }
}

/* 中心出租车图标 */
.taxi-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.taxi-background {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  border-radius: 50% 50% 50% 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3);
  animation: pulse 2s ease-in-out infinite;
  position: relative;
}

.taxi-background::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  border-radius: 50% 50% 50% 0;
  top: 0;
  left: 0;
}

.taxi-icon {
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.taxi-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(243, 156, 18, 0.4);
  }
}

/* 底部加载动画 */
.loading-container {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}

.loading-dots {
  display: flex;
  gap: 8px;
}

.loading-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  animation: loading 1.6s ease-in-out infinite;
}

@keyframes loading {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* 响应式设计 */
@media (max-width: 480px) {
  .taxi-background {
    width: 160px;
    height: 160px;
  }
  
  .taxi-icon {
    width: 60px;
    height: 60px;
  }
  
  .dot-1 { width: 40px; height: 40px; }
  .dot-2 { width: 30px; height: 30px; }
  .dot-4 { width: 60px; height: 60px; }
  .dot-9 { width: 35px; height: 35px; }
}

/* 进入动画 */
.splash-container {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
</style>
